package com.yuanian.wf.controller;

import com.yuanian.wf.pojo.dto.CompleteTaskDto;
import com.yuanian.wf.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wf")
public class TaskController {

    @Autowired
    private TaskService taskService;

    /**
     * 完成任务
     * @param completeTaskDto
     */
    @PostMapping("/completeTask")
    public void completeTask(@RequestBody CompleteTaskDto completeTaskDto) {
        taskService.completeTask(completeTaskDto);
    }
}
